//
//  TDChatToolView.m
//  liveDemo
//
//  Created by tuandai on 2017/4/17.
//  Copyright © 2017年 tuandai. All rights reserved.
//

#import "TDChatToolView.h"

@interface TDChatToolView ()


@end

@implementation TDChatToolView

+(instancetype)createView {
    return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].firstObject;
}

-(void)awakeFromNib {
    [super awakeFromNib];
    self.chatTextTield.returnKeyType = UIReturnKeySend;
}

- (IBAction)barrageSwitchChange:(UISwitch *)sender {
    if ([self.delegate respondsToSelector:@selector(barrageSwitch:)]) {
        [self.delegate barrageSwitch:sender.isOn];
    }
}


- (IBAction)chatTextTieldChange:(UITextField *)sender {
    
}


- (IBAction)sendBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(btnSendText:)]) {
        [self.delegate btnSendText:self.chatTextTield];
    }
    
}


@end
